package com.franklin.ideaplugin.maphelper.col.declaration;

import com.franklin.ideaplugin.api.beans.declaration.IDeclaration;
import com.franklin.ideaplugin.maphelper.beans.colmember.IColMember;
import com.google.common.collect.Lists;
import com.intellij.openapi.project.Project;

import java.util.Collection;
import java.util.Collections;

/**
 * 集合定义（map|collection）
 *
 * @author Ye Junhui
 * @since 2024/3/6
 */
public interface IColDeclaration<D extends IDeclaration> {

    /**
     * 获取工程
     * @return
     */
    default Project getProject(){
        return getDeclaration().getProject();
    }

    /**
     * 获取定义
     * @return
     */
    D getDeclaration();

    /**
     * 获取map成员
     *
     * @return
     */
    default Collection<IColMember> getColMembers(){
        return Collections.emptyList();
    }
}
